home *** CD-ROM | disk | FTP | other *** search
-
-
-
- //------------------------------------------------------------------
- // Name: BSP class
- // Desc: *********
- //------------------------------------------------------------------
- class BSP
- {
- private:
- //subor
- FILE *FileBsp;
-
- //////////////
- //MATERIALY //
- //////////////
- void SetBlendMode(int BlendType);
-
- //////////////
- //GROUP FACE//
- //////////////
- void InitializeGroupTextures(int Index);
- void ClearGroupTextures(int Index);
-
- void RenderGroup(int Index);
-
- void OptimalizePVS();
- void NoOptimalize();
- void Optimalize();
-
- ////////
- //READ//
- ////////
- void ReadGroup();
- void ReadFace();
- void ReadPlane();
- void ReadNode();
- void ReadLeaf();
- void ReadLight();
- void ReadLightMap();
-
-
- /////////////////
- //VERTEX BUFFER//
- /////////////////
- LPDIRECT3DVERTEXBUFFER9 g_pVB ;
- void CreateVertexBuffer();
- void FillVertexBuffer();
-
-
- public:
-
- //info
- int NumVisibleFaces;
-
- //skupina
- int NumGroups;
- BSPGROUP *Group;
-
- //plosky
- int NumFaces;
- BSPFACE *Face;
-
- //roviny
- int NumPlanes;
- PLANE *Plane;
-
- //nody
- int NumNodes;
- BSPNODE *Node;
-
- //listy
- int NumLeafs;
- BSPLEAF *Leaf;
-
- //svetla
- int NumLights;
- BSPLIGHT *Light;
-
- //lightmapy
- int NumLightMaps;
- LPDIRECT3DTEXTURE9 *g_pLightMap;
-
- /////////////
- //UNIVERZAL//
- /////////////
-
- BSP();
-
- void Load(char *FileName);
- void Render();
- void CleanUp();
-
- void SetTexture(int ToGroup,LPDIRECT3DTEXTURE9 Tex);
-
- ///////////////
- //Node & LEAF//
- ///////////////
- int GetLeafIndex(VECTOR3D P);
-
-
- };